#!/usr/bin/env node

const Koa = require('koa'),//大写，类
      task = require('./lib/task.js'),
      logger =require('koa-logger');
const app = new Koa(),//实例化
      log = console.log;

app.use(logger());  

app.use(async(ctx,next)=>{   //M-hello

  ctx.body = 'hello koa! task cost:'+await task()+'ms';
  });

app.listen(8080);




